package com.shhm.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shhm.common.entity.common.UserUniversityEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 用户高校关联表Mapper接口
 */
@Mapper
public interface UserUniversityMapper extends BaseMapper<UserUniversityEntity> {
    
    /**
     * 通过studentId查询userId
     * @param studentId 学号
     * @return 用户ID
     */
    @Select("SELECT user_id FROM tb_user_university WHERE student_id = #{studentId}")
    Long getUserIdByStudentId(String studentId);
}